package cn.iocoder.yudao.module.member.dal.mysql.praxisEntryInfo;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.member.controller.admin.praxisEntryInfo.vo.*;
import cn.iocoder.yudao.module.member.controller.admin.praxisProject.vo.PraxisProjectScheduleVO;
import cn.iocoder.yudao.module.member.dal.dataobject.praxisEntryInfo.PraxisEntryInfoDO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 项目报名信息 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface PraxisEntryInfoMapper extends BaseMapperX<PraxisEntryInfoDO> {

    List<PraxisEntryInfoPageRespVO> getEntryInfoPage(IPage page, @Param("params") Map<String, Object> params);

    List<PraxisEntryStudentPageRespVO> getEntryInfoPageByProjectId(IPage page, @Param("params") Map<String, Object> params);

    List<PraxisEntryStudentPageRespVO> getEntryInfoPageByProjectList(  @Param("params") Map<String, Object> params);

    void updateRateScore(@Param("entryId") Long entryId, @Param("rateScore") BigDecimal rateScore, @Param("updater") String updater);

    void uploadAnnex(@Param("entryId") Long entryId, @Param("annexName") String annexName,@Param("annexUrl") String annexUrl, @Param("updater") String updater);

    void updateCheckStatus( @Param("ids") List<Long> ids,  @Param("updater") String updater, @Param("checkStatus") Integer checkStatus);

    List<PraxisEntryStudentVO> getEntryStudentList(@Param("entryId") Long entryId);

    List<PraxisEntryInfoBaseVO> getEntryInfoById(@Param("ids") List<Long> ids);

    void deleteEntryInfoById(@Param("ids") List<Long> ids);

    void deleteEntryStudentByEntryId(@Param("ids") List<Long> ids);

    Long getEntryStudentCount(@Param("studentId") Long studentId,@Param("projectId") Long projectId);

    List<PraxisEntryEmailInfoVO> getEntryStudentListByIds(@Param("ids")  List<Long> ids);

    PraxisProjectScheduleVO getScheduleByProjectId(@Param("projectId") Long projectId, @Param("scheduleType") Integer scheduleType);

    /**
     *
     * @param entryId
     * @param sType 1查询材料上传截止时间  2 查询项目结束时间
     * @return
     */
    @TenantIgnore
    Long getScheduleByEntryId(@Param("entryId") Long entryId ,@Param("sType") Integer sType);

    void deleteEntryStudentByProjectId(@Param("projectId") Long projectId);

    void deleteFeedBackByProjectId(@Param("projectId") Long projectId);
}
